-- multiple_damage
-- created by huanghr
-- 额外伤害

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 对敌伤害触发
    trigger = function(who, prop, arg)
        local damage = arg;
        if tonumber(prop[3]) > 0 then
            damage = math.modf(prop[3] * damage / 1000);
        end

        return damage;
    end,

    desc = function(prop)
        local row = PropM.getRow(prop[1]);
        local desc = row.desc;
        local add = tonumber(prop[3]) / 1000;

        desc = string.gsub(desc, "{0}", add);

        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end
};
